{template 'common/header'}
<title>体验会报名确认</title>
<style type="text/css">
    *{margin:auto;}
    body {margin:0; font-family:'微软雅黑';background: url('../addons/ewei_shop/template/mobile/default/static/images/jiameng/beijing.png') no-repeat 0 0;background-size:100% 100%;}
    .header{width:80%;height:100px;float:left;margin-left:20%;margin-top:120px;color:#DCA91F;font-size:14px;}
    .content{width:80%;height:470px;}
    .main{width:100%;height:320px;float:left;}
    .main .line{width:100%;height:50px;margin-top:10px;border-bottom:1px solid #FFFFFF;}
    .line .inner{width:200px;height:34px;float:left;margin-left:10px;margin-top:8px;}
    .line input {float:left; height:34px; width:100%; padding:0px; margin:0px; border:0px; outline:none; font-size:16px; color:#fff;padding-left:5px;background:none;}
    .line select  {float:left; border:none;height:25px;width:100%;color:#666;font-size:16px;margin-top:10px;}
    .tubiao{width:50px;height:34px;border-right:1px solid #FFFFFF;float:left;margin-top:8px;margin-left:10px;}
    .main .submit{width:100%;height:50px;background:#F8BD15;border-radius:20px;margin-top:30px;text-align:center;line-height:50px;color:#fff;}
</style>
<div id='container'></div>
<div class='header'>
    会议名称：{$meeting['title']}<br/>
    会议时间：{php echo date('Y-m-d',$meeting['starttime']);}<br/>
    会议地点：{$meeting['address']}
</div>
<div class='content'>
    <div class="main">
        <div class="line">
            <div class='tubiao'><img src='../addons/ewei_shop/template/mobile/default/static/images/jiameng/tubiao5.png'></div>
            <div class='inner'>
                <input type="text" id="name" value="" placeholder="姓名"/>
            </div>
        </div>
        <div class="line">
            <div class='tubiao'><img src='../addons/ewei_shop/template/mobile/default/static/images/jiameng/tubiao6.png'></div>
            <div class='inner'>
                <input type="text" id="shop_name" value="" placeholder="门店名称"/>
            </div>
        </div>
        <div class="line">
            <div class='tubiao'><img src='../addons/ewei_shop/template/mobile/default/static/images/jiameng/tubiao7.png'></div>
            <div class='inner'>
                <input type="text" id="shop_address" value="" placeholder="门店地址"/>
            </div>
        </div>
        <div class="line">
            <div class='tubiao'><img src='../addons/ewei_shop/template/mobile/default/static/images/jiameng/tubiao8.png'></div>
            <div class='inner'>
                <input type="text" id="mobile" value="" placeholder="联系电话"/>
            </div>
        </div>
        <div class="submit" id='submit'>确认报名</div>
    </div>
</div>
<script language="javascript">
    require(['tpl', 'core'], function(tpl, core) {   
                            $('#submit').click(function(){
                               if($(this).attr('saving')=='1'){
                                   return;
                               }
                                $(this).html('正在处理...').attr('saving',1);
                                if($('#name').isEmpty()){
                                    core.tip.show('请输入姓名!');
                                    return;
                                }
                                if($('#shop_name').isEmpty()){
                                    core.tip.show('请输入门店名称!');
                                    return;
                                }
                                if($('#shop_address').isEmpty()){
                                    core.tip.show('请输入门店地址!');
                                    return;
                                }
                                if($('#mobile').isEmpty()){
                                    core.tip.show('请输入电话号码!');
                                    return;
                                }
                                var data = {
                                        name: $('#name').val(),
                                        shop_name: $('#shop_name').val(),
                                        shop_address: $('#shop_address').val(),
                                        mobile: $('#mobile').val()
                                }
                                core.json('franchise/list',{
                                    op:'join_meeting',
                                    meeting_id:"{$_GPC['meeting_id']}",
                                    data:data
                                 },function(postjson){
                                     if(postjson.status==1){
                                        location.href ="{php echo $this->createMobileUrl('franchise/list',array('op'=>'experience_meeting','type'=>1))}";
                                     }else{
                                         core.tip.show('操作失败'); 
                                         $('#submit').html('确认报名').removeAttr('saving');
                                     }
                                },true,true);
                           }); 
    });
</script>
{template 'common/footer'}